home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / kcl / akcl / kcl.lha / c / fasl_vector < prev    next >
Text File  |  1986-06-24  |  591b  |  34 lines

  1. object
  2. read_fasl_vector(in)
  3. object in;
  4. {
  5.     int dimcount, dim;
  6.     object x;
  7.     int a;
  8.     object *vsp;        
  9.  
  10.     while (readc_stream(in) != '#')
  11.         ;
  12.     while (readc_stream(in) != '(')
  13.         ;
  14.     vsp = vs_top;
  15.     dimcount = 0;
  16.     for (;;) {
  17.         delimiting_char = code_char(')');
  18.         x = read_object_non_recursive(in);
  19.         if (x == OBJNULL)
  20.             break;
  21.         vs_check_push(x);
  22.         dimcount++;
  23.     }    
  24.     x = alloc_simple_vector(dimcount, aet_object);
  25.     vs_push(x);
  26.     x->v.v_self
  27.     = (object *)alloc_relblock(dimcount * sizeof(object));
  28.     vs_pop;
  29.     for (dim = 0; dim < dimcount; dim++)
  30.         x->v.v_self[dim] = vsp[dim];
  31.     vs_top = vsp;
  32.     return(x);
  33. }
  34.